import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import { XTailVue3ComponentResolverSSR } from '@xtail/unplugin-vue3'
import { XTailVue3ElComponentResolverSSR } from '@xtail/unplugin-vue3-el'

export const createRenderComponents = () => {
  return Components({
    dts: 'types/components.d.ts',
    resolvers: [
      ElementPlusResolver(),
      XTailVue3ComponentResolverSSR(),
      XTailVue3ElComponentResolverSSR()
    ],
    dirs: ['src/components']
  })
}
